/*
 * 百度在线网络技术（北京）有限公司拥有本软件版权2021并保留所有权利。
 * Copyright 2021, Baidu.com,Inc 2:Baidu Online Network Technology (Beijing) Co.,Ltd,
 * All rights reserved.
 */

package com.azdebugit.moshi.test.learn.ifelse.test.meiju.impl;

import com.azdebugit.moshi.test.learn.ifelse.test.meiju.ActivityStrategy;

import java.math.BigDecimal;

//满30减5活动策略--具体实现类
public class  Full30Minus5ActivityStrategy  implements ActivityStrategy {
                @Override
        public  BigDecimal getDiscount(BigDecimal amount)  {
                      return  amount.subtract(BigDecimal.valueOf(5d)).setScale(2);
                }
                @Override
        public  String getType()  {
                        return  Full30Minus5ActivityStrategy.class.getName();
                }
        }